package com.hw.ui.config;

import com.hw.base.present.BasePresenter;

public class ConfigPresent extends BasePresenter<ConfigModel, ConfigView> implements ConfigModel.CallBack {

    public void config(String url, String cid) {
        view.showProgress();
        model.config(url, cid,this);
    }

    public void download() {
        view.showProgress();
        model.download(this);
    }

    @Override
    public void onconfigSuccess(String str) {
        if(view==null){
            return;
        }
        view.hideProgress();
        view.config(str);
    }

    @Override
    public void ondownload(String str) {
        if(view==null){
            return;
        }
        view.hideProgress();
        view.download(str);
    }



    @Override
    public void onFail(String str) {
        if(view==null){
            return;
        }
        view.hideProgress();
        view.config(str);
    }
}


